home *** CD-ROM | disk | FTP | other *** search
- Path: news.ust.hk!ec_wsk
- From: ec_wsk@uxmail.ust.hk (Wong Siu Ki)
- Newsgroups: comp.lang.c++
- Subject: question in c++
- Date: 20 Apr 1996 02:07:05 GMT
- Organization: The Hong Kong University of Science and Technology
- Message-ID: <4l9gs9$4jp@ustsu10.ust.hk>
- NNTP-Posting-Host: ustsu4.ust.hk
- X-Newsreader: TIN [version 1.2 PL2]
-
- It won't execute the cin in the while loop, how can I solve it?
-
- #include <iostream.h>
- #include <stdio.h>
-
- void main()
- {
- int x;
- char command;
- int data[500];
- int temp;
- while (scanf("%d", &temp)!=EOF)
- {
- x++;
- data[x]=temp;
- }
-
- while (command!='e')
- {
- cout << "Enter command:";
- cin >> command;
- cout << "test" << endl;
- }
-
- }
-
-
- --
- K.
-
-
- Wong Siu Ki ñ²Ñⁿ░≥
- ec_wsk@stu.ust.hk
- Economics BSc Year 2
-